<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul>
        <li>知否知否，应是等你好久</li>
        <li>知否知否，应是等你好久</li>
        <ol id="ol">
            <li>知否知否，应是等你好久</li>
            <li>知否知否，应是等你好久</li>
            <li>知否知否，应是等你好久</li>
        </ol>
    </ul>
    <script>
        var lis = document.getElementsByTagName('li')
        console.log(lis[0]);
        for (var i = 0; i < lis.length; i++) {
            console.log(lis[i]);
        }
        // 
        // var ol = document.getElementsByTagName('ol')
        // console.log(ol[0].getElementsByTagName('li'));
        var ol = document.getElementById('ol')
        console.log(ol.getElementsByTagName('li'))
    </script>
</body>

</html>